'use strict'
let mongoose = require('mongoose')
let Schema = mongoose.Schema
let ObjectId = Schema.ObjectId

let PlayerSchema = new Schema({
  _id: Number,
  registerTime: Number,
  userId: ObjectId,
  serverId: Number,
  name: String, //名字
  templateId: Number, //模板id
  basicInfo: {}, //角色基础信息
  equipments: {}, //角色装备信息
  initAttri: {}, //初始分配的属性
  trialInfo: {}, //试炼数据
  adventureBag: [], //冒险背包
  loginDay: Number, //最近登陆的当天
  cureBar: {},
  bag: { //背包信息
  },
});
/**/
mongoose.model('Player', PlayerSchema)

PlayerSchema.index({
  registerTime: 1,
})
